package jy.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Tdemand entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tdemand", catalog = "jlubank")
public class Tdemand implements java.io.Serializable {

	// Fields

	private String id;
	private Taccount taccount;
	private float amount;
	private float tamount;

	// Constructors

	/** default constructor */
	public Tdemand() {
	}

	/** minimal constructor */
	public Tdemand(String id) {
		this.id = id;
	}

	/** full constructor */
	public Tdemand(String id, Taccount taccount, float amount, float tamount) {
		this.id = id;
		this.taccount = taccount;
		this.amount = amount;
		this.tamount = tamount;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "acid")
	public Taccount getTaccount() {
		return this.taccount;
	}

	public void setTaccount(Taccount taccount) {
		this.taccount = taccount;
	}

	@Column(name = "amount", precision = 12, scale = 0)
	public float getAmount() {
		return this.amount;
	}

	public void setAmount(float amount) {
		this.amount = amount;
	}

	@Column(name = "tamount", precision = 12, scale = 0)
	public float getTamount() {
		return this.tamount;
	}

	public void setTamount(float tamount) {
		this.tamount = tamount;
	}

}